<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="<c:url value="/resources/css/view.css"/>" >
</head>
<body>
 
<h1>Customer Info</h1>
<table>

<tr><td><b>Login info:</b></td></tr>
<tr>
   <td>Login:</td>
   <td><c:out value="${customer.user.name}" /></td>
   <td>
        <a href="<c:url value="/user/userForm"/>" > edit login info </a>
	 </td>
</tr>

<tr>
   <td>email:</td>
   <td><c:out value="${customer.user.email}" /></td>
</tr>
<tr><td><b>Personal info:</b></td></tr>
<tr>
   <td>First Name:</td>
   <td><c:out value="${customer.firstName}" /></td>
   <td>
        <a href="<c:url value="/customer/edit"/>" > edit personal info </a>
	 </td>
</tr>
<tr>
   <td>Last Name:</td>
   <td><c:out value="${customer.lastName}" /></td>
</tr>
<tr>   
   <td>Gender:</td>
   <c:if test="${customer.gender}">
   		<td><c:out value="male" /></td>
   </c:if>
   <c:if test="${!customer.gender}">
   		<td><c:out value="female" /></td>
   </c:if>
</tr>
<tr>
   <td>BirthDate</td>
   <td><c:out value="${customer.birthDate}" /></td>
</tr>
<tr><td><b>Shipping adress:</b></td></tr>
<tr>
   <td>Address1</td>
   <td><c:out value="${address.address1}" /></td>
	<td>
        <a href="<c:url value="/customer/address"/>">Manage Addresses</a>
	 </td>
</tr>
<tr>
   <td>Address2</td>
   <td><c:out value="${address.address2}" /></td>
</tr>
<tr>
   <td>City</td>
   <td><c:out value="${address.city}" /></td>
</tr>
<tr>
   <td>State</td>
   <td><c:out value="${address.state}" /></td>
</tr>
<tr>
   <td>Country</td>
   <td><c:out value="${address.country}" /></td>
</tr>
<tr>
   <td>ZIP</td>
   <td><c:out value="${address.zip}" /></td>
</tr>
<tr>
   <td>Phone</td>
   <td><c:out value="${address.phone}" /></td>
   <td>
        <a href="<c:url value="/home"/>" > home </a>
	</td>
</tr>

</table>
</body>
</html>
